package com.neusoft.mapper;

import com.github.pagehelper.Page;
import com.neusoft.domain.FoodCategory;
import org.apache.ibatis.annotations.*;

@Mapper
public interface FoodCategoryMapper {

    Page<FoodCategory> pageSelectFoodCategory(@Param("categoryName") String categoryName, @Param("shopId") Integer shopId);
    @Insert("INSERT INTO food_category (category_name,shop_id) values (#{categoryName},#{shopId})")
    void saveCategory(FoodCategory foodCategory);
    @Update("update food_category set category_name=#{categoryName},shop_id=#{shopId} where category_id=#{categoryId}")
    void updateCategory(FoodCategory foodCategory);
    @Delete("delete from food_category where category_id=#{categoryId}")
    void deleteCategory(Integer categoryId);
    @Select("select category_name from food_category where category_id=#{categoryId}")
    String selectCategoryName(Integer categoryId);
}
